3.2.24 \(\int \frac {1}{\sqrt {a+b \tan ^2(e+f x)}} \, dx\) [124]

3.2.24.1 Optimal result
3.2.24.2 Mathematica [A] (verified)
3.2.24.3 Rubi [A] (verified)
3.2.24.4 Maple [A] (verified)
3.2.24.5 Fricas [A] (verification not implemented)
3.2.24.6 Sympy [F]
3.2.24.7 Maxima [F(-2)]
3.2.24.8 Giac [F]
3.2.24.9 Mupad [B] (verification not implemented)

3.2.24.1 Optimal result

Integrand size = 16, antiderivative size = 46 \[ \int \frac {1}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\frac {\arctan \left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{\sqrt {a-b} f} \]

output
arctan((a-b)^(1/2)*tan(f*x+e)/(a+b*tan(f*x+e)^2)^(1/2))/f/(a-b)^(1/2)
 
3.2.24.2 Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\frac {\arctan \left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{\sqrt {a-b} f} \]

input
Integrate[1/Sqrt[a + b*Tan[e + f*x]^2],x]
 
output
ArcTan[(Sqrt[a - b]*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]^2]]/(Sqrt[a - b] 
*f)
 
3.2.24.3 Rubi [A] (verified)

Time = 0.21 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3042, 4144, 291, 216}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {1}{\sqrt {a+b \tan ^2(e+f x)}} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\sqrt {a+b \tan (e+f x)^2}}dx\)

\(\Big \downarrow \) 4144

\(\displaystyle \frac {\int \frac {1}{\left (\tan ^2(e+f x)+1\right ) \sqrt {b \tan ^2(e+f x)+a}}d\tan (e+f x)}{f}\)

\(\Big \downarrow \) 291

\(\displaystyle \frac {\int \frac {1}{1-\frac {(b-a) \tan ^2(e+f x)}{b \tan ^2(e+f x)+a}}d\frac {\tan (e+f x)}{\sqrt {b \tan ^2(e+f x)+a}}}{f}\)

\(\Big \downarrow \) 216

\(\displaystyle \frac {\arctan \left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{f \sqrt {a-b}}\)

input
Int[1/Sqrt[a + b*Tan[e + f*x]^2],x]
 
output
ArcTan[(Sqrt[a - b]*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]^2]]/(Sqrt[a - b] 
*f)
 

3.2.24.3.1 Defintions of rubi rules used

rule 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

rule 291
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Subst 
[Int[1/(c - (b*c - a*d)*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b, c, 
d}, x] && NeQ[b*c - a*d, 0]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4144
Int[((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_), x_Symbol] :> 
With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[c*(ff/f)   Subst[Int[(a + b* 
(ff*x)^n)^p/(c^2 + ff^2*x^2), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, 
 b, c, e, f, n, p}, x] && (IntegersQ[n, p] || IGtQ[p, 0] || EqQ[n^2, 4] || 
EqQ[n^2, 16])
 
3.2.24.4 Maple [A] (verified)

Time = 0.09 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.46

method result size
derivativedivides \(\frac {\sqrt {b^{4} \left (a -b \right )}\, \arctan \left (\frac {b^{2} \left (a -b \right ) \tan \left (f x +e \right )}{\sqrt {b^{4} \left (a -b \right )}\, \sqrt {a +b \tan \left (f x +e \right )^{2}}}\right )}{f \,b^{2} \left (a -b \right )}\) \(67\)
default \(\frac {\sqrt {b^{4} \left (a -b \right )}\, \arctan \left (\frac {b^{2} \left (a -b \right ) \tan \left (f x +e \right )}{\sqrt {b^{4} \left (a -b \right )}\, \sqrt {a +b \tan \left (f x +e \right )^{2}}}\right )}{f \,b^{2} \left (a -b \right )}\) \(67\)

input
int(1/(a+b*tan(f*x+e)^2)^(1/2),x,method=_RETURNVERBOSE)
 
output
1/f*(b^4*(a-b))^(1/2)/b^2/(a-b)*arctan(b^2*(a-b)/(b^4*(a-b))^(1/2)/(a+b*ta 
n(f*x+e)^2)^(1/2)*tan(f*x+e))
 
3.2.24.5 Fricas [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 125, normalized size of antiderivative = 2.72 \[ \int \frac {1}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\left [-\frac {\sqrt {-a + b} \log \left (-\frac {{\left (a - 2 \, b\right )} \tan \left (f x + e\right )^{2} - 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a + b} \tan \left (f x + e\right ) - a}{\tan \left (f x + e\right )^{2} + 1}\right )}{2 \, {\left (a - b\right )} f}, \frac {\arctan \left (-\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a}}{\sqrt {a - b} \tan \left (f x + e\right )}\right )}{\sqrt {a - b} f}\right ] \]

input
integrate(1/(a+b*tan(f*x+e)^2)^(1/2),x, algorithm="fricas")
 
output
[-1/2*sqrt(-a + b)*log(-((a - 2*b)*tan(f*x + e)^2 - 2*sqrt(b*tan(f*x + e)^ 
2 + a)*sqrt(-a + b)*tan(f*x + e) - a)/(tan(f*x + e)^2 + 1))/((a - b)*f), a 
rctan(-sqrt(b*tan(f*x + e)^2 + a)/(sqrt(a - b)*tan(f*x + e)))/(sqrt(a - b) 
*f)]
 
3.2.24.6 Sympy [F]

\[ \int \frac {1}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\int \frac {1}{\sqrt {a + b \tan ^{2}{\left (e + f x \right )}}}\, dx \]

input
integrate(1/(a+b*tan(f*x+e)**2)**(1/2),x)
 
output
Integral(1/sqrt(a + b*tan(e + f*x)**2), x)
 
3.2.24.7 Maxima [F(-2)]

Exception generated. \[ \int \frac {1}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\text {Exception raised: ValueError} \]

input
integrate(1/(a+b*tan(f*x+e)^2)^(1/2),x, algorithm="maxima")
 
output
Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(b-a>0)', see `assume?` for more 
details)Is
 
3.2.24.8 Giac [F]

\[ \int \frac {1}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\int { \frac {1}{\sqrt {b \tan \left (f x + e\right )^{2} + a}} \,d x } \]

input
integrate(1/(a+b*tan(f*x+e)^2)^(1/2),x, algorithm="giac")
 
output
sage0*x
 
3.2.24.9 Mupad [B] (verification not implemented)

Time = 11.85 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.87 \[ \int \frac {1}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\frac {\mathrm {atan}\left (\frac {\mathrm {tan}\left (e+f\,x\right )\,\sqrt {a-b}}{\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}}\right )}{f\,\sqrt {a-b}} \]

input
int(1/(a + b*tan(e + f*x)^2)^(1/2),x)
 
output
atan((tan(e + f*x)*(a - b)^(1/2))/(a + b*tan(e + f*x)^2)^(1/2))/(f*(a - b) 
^(1/2))